#food_list = ["馒头", "米饭", "包子", "水饺", 23, 56, 34.56, [1,2,3]]
# for item in food_list:
#     print(item)

# i = 0
# while i < len(food_list):
#     print(food_list[i])
#     i += 1

food_list1 = ["馒头", "米饭", "包子"]
food_list2 = ["花生", "啤酒", "火腿肠"]
food_list3 = ["瓜子", "矿泉水", "鸭脖"]
food_list = [food_list1,food_list2,food_list3]
# for item in food_list:
#     print(item)
#     for name in item:
#         print(name)

# 遍历获取索引与对应的值
# for i,value in enumerate(food_list1):
#     print(f"第{i+1}个元素的值为{value}")

for i,value in enumerate(food_list):
    print(f"第{i + 1}个元素的值为{value}")
    for j,name in enumerate(value):
        print(f"第{j+1}个元素的值为{name}")